<script>
import outMain from "@/components/outMain.vue";
import elSelect from "@/components/public/elSelect.vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { signDetails } from "@/http/api";

export default {
  components: { outMain, elSelect },
  name: "",
  data() {
    return {
      detailId: this.$route.query.id,
      formData: {},
      showCont: false,
    };
  },
  props: {},
  setup() {},
  methods: {
    backFn() {
      this.$router.back();
    },
    linkFn(url, id, type) {
      this.$router.push({ path: url, query: { id: id, type: type } });
    },
    getData() {
      signDetails({ user_accreditation_sign_id: this.detailId }).then((res) => {
        if (res.data.code == 1) {
          this.formData = res.data.data;
          this.showCont = true;
        }
      });
    },
  },
  mounted() {},
  created() {
    this.getData();
  },
};
</script>
<template>
  <outMain>
    <div class="formCont">
      <div class="formStep">
        <div class="formHead">
          <div>订单详情</div>
          <btn value="返回上一级" @ok="backFn"></btn>
        </div>
        <div class="formMain" v-if="showCont">
          <div class="stepCont">
            <div class="formDes">
              <div class="desTitle">订单信息</div>
              <div class="desCont">
                <div class="desItem desNoLeft">
                  <div class="desName">订单编号</div>
                  <div class="desText">000001</div>
                </div>
                <div class="desItem">
                  <div class="desName">证件名称</div>
                  <div class="desText">
                    <span
                      class="linkText_"
                      @click="
                        linkFn(
                          '/workListDetail',
                          formData.accreditation_content_id
                        )
                      "
                    >
                      {{ formData.accreditation.accreditation_name }}
                    </span>
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">订单金额</div>
                  <div class="desText">{{ formData.pay_money }}元</div>
                </div>
                <div class="desItem desNoLeft">
                  <div class="desName">订单状态</div>
                  <div class="desText">
                    <el-tag type="danger" v-if="formData.pay_status == 1"
                      >待支付</el-tag
                    >
                    <el-tag type="warning" v-if="formData.pay_status == 2"
                      >待接单</el-tag
                    >
                    <el-tag v-if="formData.pay_status == 3">办理中</el-tag>
                    <el-tag type="success" v-if="formData.pay_status == 4"
                      >已完成</el-tag
                    >
                    <el-tag type="info" v-if="formData.pay_status == 5"
                      >已取消</el-tag
                    >
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">创建时间</div>
                  <div class="desText">{{ formData.create_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">支付时间</div>
                  <div class="desText">{{ formData.pay_time }}</div>
                </div>
                <div class="desItem desNoLeft">
                  <div class="desName">完成时间</div>
                  <div class="desText">{{ formData.complete_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">取消时间</div>
                  <div class="desText">{{ formData.cancel_time }}</div>
                </div>
              </div>
            </div>
            <div class="formDes">
              <div class="desTitle">用户信息</div>
              <div class="desCont">
                <div class="desItem desNoLeft">
                  <div class="desName">姓名</div>
                  <div class="desText">{{ formData.real_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">手机号</div>
                  <div class="desText">{{ formData.mobile }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">身份证号</div>
                  <div class="desText">{{ formData.id_card }}</div>
                </div>
                <div class="desItem desNoLeft">
                  <div class="desName">海事局密码</div>
                  <div class="desText">{{ formData.hsj_password }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">收件人</div>
                  <div class="desText">{{ formData.zs_shr }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">收件人电话</div>
                  <div class="desText">{{ formData.zs_mobile }}</div>
                </div>
                <div class="desItem desNoLeft">
                  <div class="desName">收货地址</div>
                  <div class="desText">
                    {{ formData.zs_city }}{{ formData.zs_address }}
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </outMain>
</template>
<style scoped lang="less"></style>
